Forum : How to write a script for "Select" lists using JavaScript?
Brief description  about Online courses   join in Online courses
View Abhijit  Paul 's Profile

How to write a script for "Select" lists using JavaScript?

Hi,
How to write a script for "Select" lists using JavaScript?
Asked by Abhijit Paul | Nov 27, 2009 |  Reply now
Replies (1)
View teacher siliconindia 's Profile
Hi abhijit,

1.To remove an item from a list set it to null
mySelectObject.options[3] = null
2. To truncate a list set its length to the maximum size you desire
mySelectObject.length = 2
3. To delete all options in a select object set the length to 0.
mySelectObject.leng

Nov 27, 2009